<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>判断奇偶</title>
    <script>
      var firstNum = parseInt(prompt("请输入一个任意整数", "6"));
      var secondNum = parseInt(prompt("请再次输入一个任意整数", "55"));
      var firstMod = firstNum % 2;
      var secondMod = secondNum % 2;
      if (firstMod === 0 && secondMod === 0) {
        alert(firstNum + "、" + secondNum + "奇偶一致, 均为偶数");
      } else if (firstMod === 1 && secondMod === 1) {
        alert(firstNum + "、" + secondNum + "奇偶一致, 均为奇数");
      } else {
        alert(firstNum + "、" + secondNum + "奇偶不一致");
      }
    </script>
  </head>
  <body></body>
</html>
